package com.example.newbee.mvp.presenter;

import com.example.mylibrary.mvp.presenter.BasePresenter;
import com.example.newbee.bean.TagBean;
import com.example.newbee.mvp.contact.TravelContract;

import java.util.List;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

public class TravelPresenter extends BasePresenter<TravelContract.Model, TravelContract.View> {
    public TravelPresenter(TravelContract.Model mModel, TravelContract.View mView) {
        super(mModel, mView);
    }

    public void tags(){
        mModel.requestTag(new Observer<List<TagBean>>() {
            @Override
            public void onSubscribe(Disposable d) {

            }

            @Override
            public void onNext(List<TagBean> tagBeans) {
                mView.initTabAdapter(tagBeans);
                mView.initPagerAdapter(tagBeans);
            }

            @Override
            public void onError(Throwable e) {

            }

            @Override
            public void onComplete() {

            }
        });
    }


}
